#include "cylinder.h"
#include "CSerialPort.h"

using namespace std;

static unsigned char re_msg =  0 ;//串口接受的flag
char mode = 0;//模式切换，0为，1为

int fd;
fd_set fs_read;
struct termios option;
CSerialPort myserialport(fd, option, fs_read);      //打开串口

int main()
{
	while (true)
	{
		if (mode == 0)
		{	
			SimpleOpenNIViewer v;

			v.run();
		}
		else
		{
			usleep(1000);
		}
	}
}